package com.sx.service.user;

import com.sx.basic.IBasicService;
import com.sx.entity.user.RelationEntity;

/**
 * @author AdinZ
 * @date 2020/11/18 14:20
 */
public interface IRelationService extends IBasicService<RelationEntity,Long> {

    /**
     * 查找用户的邀请人 第一次邀请人
      * @param uid 用户id
     * @return
     */
    Long findInvite(long uid);

    /**
     * 查找用户的邀请人
     * @param uid 用户id
     * @param level 层级
     * @return
     */
    Long findInvite(long uid, int level);

    /**
     * 注册关系用户表
     * @param inviteUid 邀请用户id
     * @param uid 注册用户id
     */
    void registered(long inviteUid,long uid,int length);

}
